#!/usr/bin/python3
# name 'List' is not defined
from typing import List

class TwoSum:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        hashtable = dict()
        for size, num in enumerate(nums):
            if target - num in hashtable:
                return [hashtable[target - num], size]
            hashtable[nums[size]] = size
        return []


print('TwoSum Python3 demo start')
twoSumClass = TwoSum()
numList = [2, 7, 11, 15]
target = 9
result = twoSumClass.twoSum(numList, target)
print("TwoSum Python3 result:",result)